#include <iostream>
#include <ctime>
#include "uniprof.h"
#include "menu.h"

using namespace std;

string UniProf::DeadLine()
{
	Menu m;
	time_t now = time(0);
	tm *ltm = localtime(&now);
	
	int yearI = 1901 + ltm->tm_year;
	int monthI = 1 + ltm->tm_mon;
	int dayI = ltm->tm_mday;
	
 	string year = m.Menu::InttoString(yearI);
	string month = m.Menu::InttoString(monthI);
	string day = m.Menu::InttoString(dayI);

	if (month.size() == 1)
		month = "0" + month;
	
	if (day.size() == 1)
		day = "0" + day;
	
	string str = year + "." + month + "." + day;
	return str;
}